package com.hanyxx.exception;

/**
 * @author layman
 * @date 2021/3/1
 */
public class Demo01 {
    public static void main(String[] args) {
        int[] arr = new int[]{10,20,30};
        int number = getNumber(arr,5);
        System.out.println(number);
    }

    /**
     * 获取指定索引位置的数据
     */
    public static int getNumber(int[] arr,int index){
        int number = arr[index];
        return number;
    }
}
